package jmcnet.libcommun.communs.enum
{
	import flash.utils.Dictionary;
	
	import jmcnet.libcommun.communs.enum.EnumBase;
	import jmcnet.libcommun.communs.exceptions.ErrorIllegalEnumValue;
	
	import mx.collections.ArrayCollection;

	public class EnumDepartement extends EnumBase
	{
		/**
	     * Les valeurs possibles 
	     */
    	public static const TYPE_01:EnumDepartement = new EnumDepartement("Ain (01)");
		public static const TYPE_02:EnumDepartement = new EnumDepartement("Aisne (02)");
		public static const TYPE_03:EnumDepartement = new EnumDepartement("Allier (03)");
		public static const TYPE_04:EnumDepartement = new EnumDepartement("Alpes-de-Haute-Provence (04)");
		public static const TYPE_06:EnumDepartement = new EnumDepartement("Alpes-Maritimes (06)");
		public static const TYPE_07:EnumDepartement = new EnumDepartement("Ardèche (07)");
		public static const TYPE_08:EnumDepartement = new EnumDepartement("Ardennes (08)");
		public static const TYPE_09:EnumDepartement = new EnumDepartement("Ariège (09)");
		public static const TYPE_10:EnumDepartement = new EnumDepartement("Aube (10)");
		public static const TYPE_11:EnumDepartement = new EnumDepartement("Aude (11)");
		public static const TYPE_12:EnumDepartement = new EnumDepartement("Aveyron (12)");
		public static const TYPE_67:EnumDepartement = new EnumDepartement("Bas-Rhin (67)");
		public static const TYPE_13:EnumDepartement = new EnumDepartement("Bouches-du-rhône (13)");
		public static const TYPE_14:EnumDepartement = new EnumDepartement("Calvados (14)");
		public static const TYPE_15:EnumDepartement = new EnumDepartement("Cantal (15)");
		public static const TYPE_16:EnumDepartement = new EnumDepartement("Charente (16)");
		public static const TYPE_17:EnumDepartement = new EnumDepartement("Charente-Maritime (17)");
		public static const TYPE_18:EnumDepartement = new EnumDepartement("Cher (18)");
		public static const TYPE_19:EnumDepartement = new EnumDepartement("Corrèze (19)");
		public static const TYPE_2A:EnumDepartement = new EnumDepartement("Corse-du-Sud (2A)");
		public static const TYPE_21:EnumDepartement = new EnumDepartement("Côte d'Or (21)");
		public static const TYPE_22:EnumDepartement = new EnumDepartement("Côtes d'Armor (22)");
		public static const TYPE_23:EnumDepartement = new EnumDepartement("Creuse (23)");
		public static const TYPE_79:EnumDepartement = new EnumDepartement("Deux-Sèvres (79)");
		public static const TYPE_24:EnumDepartement = new EnumDepartement("Dordogne (24)");
		public static const TYPE_25:EnumDepartement = new EnumDepartement("Doubs (25)");
		public static const TYPE_26:EnumDepartement = new EnumDepartement("Drôme (26)");
		public static const TYPE_91:EnumDepartement = new EnumDepartement("Essonne (91)");
		public static const TYPE_27:EnumDepartement = new EnumDepartement("Eure (27)");
		public static const TYPE_28:EnumDepartement = new EnumDepartement("Eure-et-Loir (28)");
		public static const TYPE_29:EnumDepartement = new EnumDepartement("Finistère (29)");
		public static const TYPE_30:EnumDepartement = new EnumDepartement("Gard (30)");
		public static const TYPE_32:EnumDepartement = new EnumDepartement("Gers (32)");
		public static const TYPE_33:EnumDepartement = new EnumDepartement("Gironde (33)");
		public static const TYPE_68:EnumDepartement = new EnumDepartement("Haut-Rhin (68)");
		public static const TYPE_2B:EnumDepartement = new EnumDepartement("Haute-Corse (2B)");
		public static const TYPE_31:EnumDepartement = new EnumDepartement("Haute-Garonne (31)");
		public static const TYPE_43:EnumDepartement = new EnumDepartement("Haute-Loire (43)");
		public static const TYPE_52:EnumDepartement = new EnumDepartement("Haute-Marne (52)");
		public static const TYPE_70:EnumDepartement = new EnumDepartement("Haute-Saône (70)");
		public static const TYPE_74:EnumDepartement = new EnumDepartement("Haute-Savoie (74)");
		public static const TYPE_87:EnumDepartement = new EnumDepartement("Haute-Vienne (87)");
		public static const TYPE_05:EnumDepartement = new EnumDepartement("Hautes-Alpes (05)");
		public static const TYPE_65:EnumDepartement = new EnumDepartement("Hautes-Pyrénées (65)");
		public static const TYPE_92:EnumDepartement = new EnumDepartement("Hauts-de-Seine (92)");
		public static const TYPE_34:EnumDepartement = new EnumDepartement("H&eacute;rault (34)");
		public static const TYPE_35:EnumDepartement = new EnumDepartement("Ille-et-Vilaine (35)");
		public static const TYPE_36:EnumDepartement = new EnumDepartement("Indre (36)");
		public static const TYPE_37:EnumDepartement = new EnumDepartement("Indre-et-Loire (37)");
		public static const TYPE_38:EnumDepartement = new EnumDepartement("Is&egrave;re (38)");
		public static const TYPE_39:EnumDepartement = new EnumDepartement("Jura (39)");
		public static const TYPE_40:EnumDepartement = new EnumDepartement("Landes (40)");
		public static const TYPE_41:EnumDepartement = new EnumDepartement("Loir-et-Cher (41)");
		public static const TYPE_42:EnumDepartement = new EnumDepartement("Loire (42)");
		public static const TYPE_44:EnumDepartement = new EnumDepartement("Loire-Atlantique (44)");
		public static const TYPE_45:EnumDepartement = new EnumDepartement("Loiret (45)");
		public static const TYPE_46:EnumDepartement = new EnumDepartement("Lot (46)");
		public static const TYPE_47:EnumDepartement = new EnumDepartement("Lot-et-Garonne (47)");
		public static const TYPE_48:EnumDepartement = new EnumDepartement("Loz&egrave;re (48)");
		public static const TYPE_49:EnumDepartement = new EnumDepartement("Maine-et-Loire (49)");
		public static const TYPE_50:EnumDepartement = new EnumDepartement("Manche (50)");
		public static const TYPE_51:EnumDepartement = new EnumDepartement("Marne (51)");
		public static const TYPE_53:EnumDepartement = new EnumDepartement("Mayenne (53)");
		public static const TYPE_976:EnumDepartement = new EnumDepartement("Mayotte (976)");
		public static const TYPE_54:EnumDepartement = new EnumDepartement("Meurthe-et-Moselle (54)");
		public static const TYPE_55:EnumDepartement = new EnumDepartement("Meuse (55)");
		public static const TYPE_56:EnumDepartement = new EnumDepartement("Morbihan (56)");
		public static const TYPE_57:EnumDepartement = new EnumDepartement("Moselle (57)");
		public static const TYPE_58:EnumDepartement = new EnumDepartement("Ni&egrave;vre (58)");
		public static const TYPE_59:EnumDepartement = new EnumDepartement("Nord (59)");
		public static const TYPE_60:EnumDepartement = new EnumDepartement("Oise (60)");
		public static const TYPE_61:EnumDepartement = new EnumDepartement("Orne (61)");
		public static const TYPE_75:EnumDepartement = new EnumDepartement("Paris (75)");
		public static const TYPE_62:EnumDepartement = new EnumDepartement("Pas-de-Calais (62)");
		public static const TYPE_63:EnumDepartement = new EnumDepartement("Puy-de-D&ocirc;me (63)");
		public static const TYPE_64:EnumDepartement = new EnumDepartement("Pyr&eacute;n&eacute;es-Atlantiques (64)");
		public static const TYPE_66:EnumDepartement = new EnumDepartement("Pyr&eacute;n&eacute;es-Orientales (66)");
		public static const TYPE_69:EnumDepartement = new EnumDepartement("Rh&ocirc;ne (69)");
		public static const TYPE_975:EnumDepartement = new EnumDepartement("Saint-Pierre-et-Miquelon (975)");
		public static const TYPE_71:EnumDepartement = new EnumDepartement("Sa&ocirc;ne-et-Loire (71)");
		public static const TYPE_72:EnumDepartement = new EnumDepartement("Sarthe (72)");
		public static const TYPE_73:EnumDepartement = new EnumDepartement("Savoie (73)");
		public static const TYPE_77:EnumDepartement = new EnumDepartement("Seine-et-Marne (77)");
		public static const TYPE_76:EnumDepartement = new EnumDepartement("Seine-Maritime (76)");
		public static const TYPE_93:EnumDepartement = new EnumDepartement("Seine-Saint-Denis (93)");
		public static const TYPE_80:EnumDepartement = new EnumDepartement("Somme (80)");
		public static const TYPE_81:EnumDepartement = new EnumDepartement("Tarn (81)");
		public static const TYPE_82:EnumDepartement = new EnumDepartement("Tarn-et-Garonne (82)");
		public static const TYPE_90:EnumDepartement = new EnumDepartement("Territoire de Belfort (90)");
		public static const TYPE_95:EnumDepartement = new EnumDepartement("Val-d'Oise (95)");
		public static const TYPE_94:EnumDepartement = new EnumDepartement("Val-de-Marne (94)");
		public static const TYPE_83:EnumDepartement = new EnumDepartement("Var (83)");
		public static const TYPE_84:EnumDepartement = new EnumDepartement("Vaucluse (84)");
		public static const TYPE_85:EnumDepartement = new EnumDepartement("Vend&eacute;e (85)");
		public static const TYPE_86:EnumDepartement = new EnumDepartement("Vienne (86)");
		public static const TYPE_88:EnumDepartement = new EnumDepartement("Vosges (88)");
		public static const TYPE_89:EnumDepartement = new EnumDepartement("Yonne (89)");
		public static const TYPE_78:EnumDepartement = new EnumDepartement("Yvelines (78)");
	    
   	    public static function init():Boolean {			
			addPossibleValue("TYPE_01", TYPE_01);
			addPossibleValue("TYPE_02", TYPE_02);
			addPossibleValue("TYPE_03", TYPE_03);
			addPossibleValue("TYPE_04", TYPE_04);
			addPossibleValue("TYPE_05", TYPE_05);
			addPossibleValue("TYPE_06", TYPE_06);
			addPossibleValue("TYPE_07", TYPE_07);
			addPossibleValue("TYPE_08", TYPE_08);
			addPossibleValue("TYPE_09", TYPE_09);
			addPossibleValue("TYPE_10", TYPE_10);
			addPossibleValue("TYPE_11", TYPE_11);
			addPossibleValue("TYPE_12", TYPE_12);
			addPossibleValue("TYPE_13", TYPE_13);
			addPossibleValue("TYPE_14", TYPE_14);
			addPossibleValue("TYPE_15", TYPE_15);
			addPossibleValue("TYPE_16", TYPE_16);
			addPossibleValue("TYPE_17", TYPE_17);
			addPossibleValue("TYPE_18", TYPE_18);
			addPossibleValue("TYPE_19", TYPE_19);
			addPossibleValue("TYPE_2A", TYPE_2A);
			addPossibleValue("TYPE_2B", TYPE_2B);
			addPossibleValue("TYPE_21", TYPE_21);
			addPossibleValue("TYPE_22", TYPE_22);
			addPossibleValue("TYPE_23", TYPE_23);
			addPossibleValue("TYPE_24", TYPE_24);
			addPossibleValue("TYPE_25", TYPE_25);
			addPossibleValue("TYPE_26", TYPE_26);
			addPossibleValue("TYPE_27", TYPE_27);
			addPossibleValue("TYPE_28", TYPE_28);
			addPossibleValue("TYPE_29", TYPE_29);
			addPossibleValue("TYPE_30", TYPE_30);
			addPossibleValue("TYPE_31", TYPE_31);
			addPossibleValue("TYPE_32", TYPE_32);
			addPossibleValue("TYPE_33", TYPE_33);
			addPossibleValue("TYPE_34", TYPE_34);
			addPossibleValue("TYPE_35", TYPE_35);
			addPossibleValue("TYPE_36", TYPE_36);
			addPossibleValue("TYPE_37", TYPE_37);
			addPossibleValue("TYPE_38", TYPE_38);
			addPossibleValue("TYPE_39", TYPE_39);
			addPossibleValue("TYPE_40", TYPE_40);
			addPossibleValue("TYPE_41", TYPE_41);
			addPossibleValue("TYPE_42", TYPE_42);
			addPossibleValue("TYPE_43", TYPE_43);
			addPossibleValue("TYPE_44", TYPE_44);
			addPossibleValue("TYPE_45", TYPE_45);
			addPossibleValue("TYPE_46", TYPE_46);
			addPossibleValue("TYPE_47", TYPE_47);
			addPossibleValue("TYPE_48", TYPE_48);
			addPossibleValue("TYPE_49", TYPE_49);
			addPossibleValue("TYPE_50", TYPE_50);
			addPossibleValue("TYPE_51", TYPE_51);
			addPossibleValue("TYPE_52", TYPE_52);
			addPossibleValue("TYPE_53", TYPE_53);
			addPossibleValue("TYPE_54", TYPE_54);
			addPossibleValue("TYPE_55", TYPE_55);
			addPossibleValue("TYPE_56", TYPE_56);
			addPossibleValue("TYPE_57", TYPE_57);
			addPossibleValue("TYPE_58", TYPE_58);
			addPossibleValue("TYPE_58", TYPE_59);
			addPossibleValue("TYPE_60", TYPE_60);
			addPossibleValue("TYPE_61", TYPE_61);
			addPossibleValue("TYPE_62", TYPE_62);
			addPossibleValue("TYPE_63", TYPE_63);
			addPossibleValue("TYPE_64", TYPE_64);
			addPossibleValue("TYPE_65", TYPE_65);
			addPossibleValue("TYPE_66", TYPE_66);
			addPossibleValue("TYPE_67", TYPE_67);
			addPossibleValue("TYPE_68", TYPE_68);
			addPossibleValue("TYPE_69", TYPE_69);
			addPossibleValue("TYPE_70", TYPE_70);
			addPossibleValue("TYPE_71", TYPE_71);
			addPossibleValue("TYPE_72", TYPE_72);
			addPossibleValue("TYPE_73", TYPE_73);
			addPossibleValue("TYPE_74", TYPE_74);
			addPossibleValue("TYPE_75", TYPE_75);
			addPossibleValue("TYPE_76", TYPE_76);
			addPossibleValue("TYPE_77", TYPE_77);
			addPossibleValue("TYPE_78", TYPE_78);
			addPossibleValue("TYPE_79", TYPE_79);
			addPossibleValue("TYPE_80", TYPE_80);
			addPossibleValue("TYPE_81", TYPE_81);
			addPossibleValue("TYPE_82", TYPE_82);
			addPossibleValue("TYPE_83", TYPE_83);
			addPossibleValue("TYPE_84", TYPE_84);
			addPossibleValue("TYPE_85", TYPE_85);
			addPossibleValue("TYPE_86", TYPE_86);
			addPossibleValue("TYPE_87", TYPE_87);
			addPossibleValue("TYPE_88", TYPE_88);
			addPossibleValue("TYPE_89", TYPE_89);
			addPossibleValue("TYPE_90", TYPE_90);
			addPossibleValue("TYPE_91", TYPE_91);
			addPossibleValue("TYPE_92", TYPE_92);
			addPossibleValue("TYPE_93", TYPE_93);
			addPossibleValue("TYPE_94", TYPE_94);
			addPossibleValue("TYPE_95", TYPE_95);
			addPossibleValue("TYPE_975", TYPE_975);
			addPossibleValue("TYPE_976", TYPE_976);
			return true;
		}
		
		public function EnumDepartement(value:String) {
			super(value);
		}
		
		/**********************************************************************************************************************
		 * Partie commune a tous les Enum
		 */
   	    private static var _values:Dictionary = new Dictionary();
	    private static var _literals:ArrayCollection = new ArrayCollection();
	    private static var _names:ArrayCollection = new ArrayCollection();
	    private static var _valueList:ArrayCollection = new ArrayCollection();
	    
  		static private const res:Boolean = init();
	    
	    /**
	     * Ajoute une valeur possible a cet �num�r� 
	     */
	    public static function addPossibleValue(name:String, possibility:EnumBase):void {
	    	_values[possibility.value] = possibility;
	    	_valueList.addItem(possibility);
	    	_literals.addItem(possibility.value);
	    	_names.addItem(name);
	    }
	
	    public static function fromString(value:String):EnumDepartement {
	        var typeValue:EnumDepartement = _values[value];
	        if (typeValue == null)
	        {
	            throw new ErrorIllegalEnumValue("invalid value '" + value + "', possible values are: " + _literals);
	        }
	        return typeValue;
	    }
	    
	    public static function literals():ArrayCollection { return _literals; }
	    public static function names():ArrayCollection { return _names; }	    
	    public static function values():ArrayCollection  { return _valueList; }
	    public static function literalsExtended(firstChoice:String):ArrayCollection {
			var ret:ArrayCollection = new ArrayCollection();
			ret.addItem(firstChoice);
			ret.addAll(_literals);
			return ret;
		}
	}
}